#include "game_client.h"
#include "game_client_impl.h"
GameClient::GameClient(const std::string& host, int port)
{
	m_impl = new GameClientImpl(host, port);
	m_impl->setGameClient(this);
}

GameClient::~GameClient(void)
{
	delete m_impl;
}

void GameClient::login( const std::string& userName, const std::string& password, bool isGuest )
{
	m_impl->login(userName, password, isGuest);
}

void GameClient::signUp(const std::string & userName, const std::string & password)
{
	m_impl->signUp(userName, password);
}

void GameClient::activate(const std::string& newUserName, const std::string& newPassword, const std::string& phoneNo) {
	m_impl->activate(newUserName, newPassword, phoneNo);
}

void GameClient::joinRoom(int roomId) {
	m_impl->joinRoom(roomId);
}

void GameClient::sendRoomData( void* data, int len )
{
	m_impl->sendRoomData(data, len);
}

void GameClient::sendDeskData( void* data, int len )
{
	m_impl->sendDeskData(data, len);
}

void GameClient::joinDesk(int deskId, int chairId)
{
	m_impl->joinDesk(deskId, chairId);
}

void GameClient::leaveDesk()
{
	m_impl->leaveDesk();
}

void GameClient::createFriendDesk() {
	m_impl->createFriendDesk();
}

void GameClient::joinFriendDesk(const std::string deskCode)
{
	m_impl->joinFriendDesk(deskCode);
}

void GameClient::updateRoomStatus() {
	m_impl->updateRoomStatus();
}
void GameClient::leaveRoom()
{
	m_impl->leaveRoom();
}
void GameClient::updatePlayerInfo()
{
	m_impl->updatePlayerInfo();
}
GameClientPlayer* GameClient::getPlayer() {
	return m_impl->getPlayer();
}

GameClientRoomStatus* GameClient::getRoomStatus() {
	return m_impl->getRoomStatus();
}

bool GameClient::getDeskPlayers(std::vector<GameClientPlayer*>& players) {
	return m_impl->getDeskPlayers(players);
}
